package com.doge.walknovel.api

import io.reactivex.Observable
import io.reactivex.ObservableSource
import io.reactivex.ObservableTransformer

class ApiResultComposeTransformer<T : ApiResult<*>> : ObservableTransformer<T, T> {
    override fun apply(upstream: Observable<T>): ObservableSource<T> {
        return upstream.map {
            ErrorHandler.process(it)
            it
        }
    }
}
